//
//  MessageCell.m
//  Job
//
//  Created by 欧松 on 2018/8/25.
//  Copyright © 2018年 桑赐相. All rights reserved.
//

#import "MessageCell.h"
#import "XLMsgModel.h"

@interface MessageCell()
@property (weak, nonatomic) IBOutlet UILabel *head;

@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *messageLabel;
@property (weak, nonatomic) IBOutlet UIView *baseView;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;


@end

@implementation MessageCell

- (void)awakeFromNib {
    [super awakeFromNib];
//    [self.contentView setLayerRadius:3 borderColor:ClearColor borderWidth:0.0 shadowColor:[UIColor blackColor] shadowOffset:CGSizeMake(5,5) shadowOpacity:0.5 shadowRadius:3];
    [self.baseView setLayerRadius:3 borderColor:ClearColor borderWidth:0.0 shadowColor:[UIColor blackColor] shadowOffset:CGSizeMake(3,3) shadowOpacity:0.3 shadowRadius:5];
    
}

-(void)setModel:(XLMsgModel *)model{
    _model = model;
    self.timeLabel.text = model.ct;
    self.statusLabel.text = model.statusDesc;
    self.messageLabel.text = model.jobName;
    self.head.text = model.head;
}

//- (void)setModel:(MessageModel *)model {
//    _model = model;
//    self.messageLabel.text = model.content;
//    NSDate *date = [model.create_time stringWithDate:@"yyyy-MM-dd HH:mm:ss"];
//    NSString *dateString = @"";
//    if ([date isThisYear]) {
//        if ([date isToday]) {
//            dateString = [NSString stringWithFormat:@"今天 %@",[date dateFormat:@"HH:mm"]];
//        }else{
//            dateString = [NSString stringWithFormat:@"%@",[date dateFormat:@"MM-dd HH:mm"]];
//        }
//    }else{
//        dateString = [NSString stringWithFormat:@"%@",[date dateFormat:@"yyyy-MM-dd"]];
//    }
//    self.timeLabel.text = dateString;
//}




@end
